package com.itheima._02自定义异常;

/**
 * 目标：自定义运行时异常（推荐使用）
 * 作用：增强异常类型的可读性，后续在项目中针对自定义的异常类型会额外做逻辑处理
 * @Author songyu
 * @Date 2025-07-19  9:21
 */
//1.定类继承RuntimeException
public class AgeIllegalRuntimeException extends RuntimeException {

    //2.定义构造器调用父类构造器
    public AgeIllegalRuntimeException(){}
    public AgeIllegalRuntimeException(String errorMsg){
        super(errorMsg);
    }
    public AgeIllegalRuntimeException(String errorMsg, Throwable throwable){
        super(errorMsg,throwable);
    }
    public AgeIllegalRuntimeException(Throwable throwable){
        super(throwable);
    }
}